package test;

/**
 * @Author Stringzhua
 * @Date 2024/6/28 18:15
 * description:
 */
public class test03 {
    public static void main(String[] args) {
        //回文数
//        int num = 12321;
        int num = 123456;
        String ns = Integer.toString(num);
        int i = 0;
        String result = "";
        while (num > 0) {
            i = num % 10;
            result += i;
            num /= 10;
        }
        if (ns.equals(result)) {
            System.out.println("是回文数");
        } else {
            System.out.println("不是回文数");
        }
    }
}
